package com.hs.sfzy.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.hs.sfzy.entity.PubCenter;
import com.hs.sfzy.mapper.PubCenterMapper;
import com.hs.sfzy.service.PubCenterService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ClassName PubCenterServiceImpl
 * @Description TODO
 * @Author liuzhuo
 * @Date 2025年08月13日 14:59
 * @Version 1.0
 */
@Service
public class PubCenterServiceImpl implements PubCenterService {
    @Autowired
    private PubCenterMapper pubCenterMapper;


    @Override
    public PageInfo<PubCenter> selectAll(PubCenter pubCenter, int pageNum, int pageSize) {
        PageHelper.startPage(pageNum, pageSize);
        List<PubCenter> list = pubCenterMapper.selectAll(pubCenter);
        PageInfo<PubCenter> pageInfo = new PageInfo<>(list);
        return pageInfo;
    }

    @Override
    public PubCenter selectById(int id) {
        return pubCenterMapper.selectById(id);
    }
}
